package com.aia.prm.web.ria.app.ui.lms;

import com.aia.prm.BeanFactory;
import com.aia.prm.service.DefaultService;
import com.aia.prm.web.ria.app.PrmApplication;
import com.vaadin.data.Property;
import com.vaadin.ui.Table;

@SuppressWarnings("serial")
public class LmsList extends Table {
	PrmApplication app;
	LmsView view;
	DefaultService defaultService = (DefaultService) BeanFactory.get().getBean("defaultService");

	LmsList(PrmApplication aapp, LmsView aview) {
		app = aapp;
		view = aview;
		setSizeFull();

		setColumnCollapsingAllowed(true);
		setColumnReorderingAllowed(true);

		setSelectable(true);
		setImmediate(true);
		setMultiSelect(true);
		addListener((Property.ValueChangeListener) view);
		
		/*
		 * addGeneratedColumn("more", new ColumnGenerator() { public Component
		 * generateCell(Table source, Object itemId, Object columnId) { BeanItem
		 * beanItem = (BeanItem) source.getItem(itemId); VOLms bean = (VOLms)
		 * beanItem.getBean();
		 * 
		 * String template = "[请查看日志]";
		 * 
		 * Label content = new Label(template);
		 * 
		 * content.setContentMode(Label.CONTENT_TEXT);
		 * 
		 * content.setWidth("500px");
		 * 
		 * PopupView popup = new PopupView("XML报文", content);
		 * popup.setHideOnMouseOut(false);
		 * 
		 * return popup; } });
		 */
	}

}
